package com.atguigu.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Cat implements InitializingBean, DisposableBean {
    @Autowired
    private Car car;
//
//    public Cat(Car car) {
//        this.car = car;
//    }
    //
//
    public Cat() {
        System.out.println("Cat construcor...");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("cat....destroy..");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("Cat...afterPropertiesSet..");
    }
}
